package com.sgu.sms.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "aliyun.sms")
public class SmsProperties implements InitializingBean {

        private String regionId;
        private String keyId;
        private String keySecret;
        private String templateCode;
        private String signName;

        public static String REGION_Id;
        public static String KEY_ID;
        public static String KEY_SECRET;
        public static String TEMPLATE_CODE;
        public static String SIGN_NAME;

        @Override
        public void afterPropertiesSet() throws Exception {
            REGION_Id = regionId;
            KEY_ID = keyId;
            KEY_SECRET = keySecret;
            TEMPLATE_CODE = templateCode;
            SIGN_NAME = signName;

        }

    public String getRegionId() {
        return regionId;
    }

    public void setRegionId(String regionId) {
        this.regionId = regionId;
    }

    public String getKeyId() {
        return keyId;
    }

    public void setKeyId(String keyId) {
        this.keyId = keyId;
    }

    public String getKeySecret() {
        return keySecret;
    }

    public void setKeySecret(String keySecret) {
        this.keySecret = keySecret;
    }

    public String getTemplateCode() {
        return templateCode;
    }

    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }

    public String getSignName() {
        return signName;
    }

    public void setSignName(String signName) {
        this.signName = signName;
    }
}
